package com.thenie.chat.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.thenie.chat.pojo.AddRequest;
import com.thenie.chat.vo.FriendRequestVo;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author thenie
 * @since 2022-06-03
 */
public interface IAddRequestService extends IService<AddRequest> {

    /**
     * 插入一条添加请求
     * @param fromId
     * @param toId
     * @return
     */
    public int insertRequest(long fromId,long toId,int sign);

    /**
     * 好友请求记录
     * @param fromId
     * @param toId
     * @return
     */
    public AddRequest queryAddRequestFromMe(long fromId,long toId);

    /**
     * 修改状态
     * @param addRequest
     * @return
     */
    public int updateSign(AddRequest addRequest);

    /**
     * 查询好友请求记录列表
     * @param id
     * @return
     */
    public List<FriendRequestVo> queryFriendRequestList(Long id);


}
